const label = 'form行布局';
const name = 'formLayout';

export default {
    icon: 'icon-space',
    label,
    name,
    rule() {
        return {
            type: 'el-form',
            title: label,
            info: '',
            children: [],
            props:{
                id:'form-layout',
                inline: true,
                labelPosition: 'left',
                size: 'small',
                labelWidth: '80px',
            },
            style: {
                "border-top": "1px solid #dddddd",
                "border-left": "1px solid #dddddd",
                "border-right": "1px solid #dddddd",
                "backgroundColor": "#fbfbfb",
                "padding": "5px",
                "margin-top": "20px"
            },
        };
    },
    children: 'formItem',
    props() {
        return [
            {
                type: 'Struct',
                field: 'formCreateStyle',
                value: {
                },
                title: '样式',
                props: {
                    defaultValue: {},
                    validate(val) {
                        return true
                    }
                }
            },

            /*{
                type: 'object',
                field: 'formCreateStyle',
                native: true,
                props: {
                    rule: [
                        {
                            type: 'input',
                            field: 'height',
                            title: 'height',
                        },
                        {
                            type: 'input',
                            field: 'width',
                            title: 'width',
                        },
                    ]
                }
            },*/
            {
                type: 'radio',
                field: 'labelPosition',
                value: 'left',
                title: '标签位置',
                options: [
                    {value: 'right', label: 'right'},
                    {value: 'left', label: 'left'},
                    {value: 'top', label: 'top'},
                ]
            }, {
                type: 'radio',
                field: 'size',
                value: 'mini',
                title: '标签大小',
                options: [
                    {value: 'medium', label: 'medium'},
                    {value: 'small', label: 'small'},
                    {value: 'mini', label: 'mini'},
                ]
            },
            {type: 'input', field: 'labelWidth', title: '标签宽度', value:'100px'},


        ];
    }
};
